<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="lib/zhang.js"></script>
</head>
<body>
<div id="root">
    <input type="text" z-model="str">
    <input type="text" z-model="str">
    <input type="text" z-model="str">
    <button z-on:click="fn">点我</button>
    <div z-html="str"></div>
    <div z-text="str"></div>
    <input type="text" z-model="a">
    <input type="text" z-model="b">
    <hr/>
    <div>
        <input type="text" z-model="str">
        <input type="text" z-model="str">
        <input type="text" z-model="str">
        <button z-on:click="fn">点我</button>
        <div z-html="str"></div>
        <div z-text="str"></div>
        <input type="text" z-model="a">
        <input type="text" z-model="b">
    </div>
</div>
</body>
<script>
    const zm = new Zhang({
        el:"#root",
        data:{
            a:1,
            b:2,
            str:"<a href='http://baidu.com'>我马上就要开始找工作啦！</a>"
        },
        methods:{
            fn(){
                this.str = 100;
                this.a = 10;
                this.b = 20;
                // console.log("fn",this.str)
            }
        }
    })
</script>
</html>